package com.ur.dao;

import java.util.List;

import org.nutz.dao.Condition;
import org.nutz.dao.pager.Pager;
import org.nutz.ioc.loader.annotation.IocBean;

import com.ur.bean.User;

@IocBean
public class UserDao extends BasicDao {

	public boolean add(User user) {
		return this.save(user) != null ? true : false;
	}
	
	public List<User> query(Condition condition, Pager pager){
		return this.searchByPage(User.class, pager.getPageNumber(), pager.getPageSize(), null);
	}

	public int getTotalCount() {
		return this.searchCount(User.class);
	}
}
